home *** CD-ROM | disk | FTP | other *** search
- Path: lrz-muenchen.de!news
- From: Karl Martin Syring <syring@pollux.edv.agrar.tu-muenchen.de>
- Newsgroups: comp.lang.c++.leda
- Subject: Re: Compiling LEDA with MSVC++ 4.0
- Date: Wed, 07 Feb 1996 19:22:43 +0100
- Organization: Munich University of Technology
- Distribution: world
- Message-ID: <3118EDF3.4A4D@pollux.edv.agrar.tu-muenchen.de>
- References: <DMF020.6r@hauberl.greenie.muc.de>
- NNTP-Posting-Host: 141.40.105.129
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b6a (WinNT; I)
-
- This is from my knowledge base (untested):
-
- --------------------------------------------------------------------------
- From: daniel_goldwater@brown.edu (Dan Goldwater)
-
- Newsgroups: comp.lang.c++.leda
-
- Subject: SUCCESS! Compiling LEDA using MS Visual C.
-
- Date: Tue, 28 Nov 1995 08:00:27 GMT
-
- Organization: Brown University
-
-
-
-
- I have successfully compiled LEDA with Microsoft Visual C v4.0. Here
-
- is information on how to do it.
-
-
-
- 1) it won't work with visual c v2.2 or lower. you need to get MS
-
- Visual C v4.0, which was just released.
-
-
-
- 2) you need a makefile. here is mine:
-
-
-
- ***************** begin make_lib.bat *********************
-
-
-
- echo *** THIS WILL MAKE ANY UNMADE STUFF ***
-
-
-
- rem microsoft's lib is a bit bogus in that the /out: parameter
-
- rem is required
-
- rem if you want to create a new .lib file, but cannot be
-
- rem used to add to
-
- rem an existing .lib (it will overwrite an existing lib).
-
-
-
- cd src\basic
-
- nmake /nologo /i /f ..\make.src L=libL
-
- lib /nologo /out:..\..\libL.lib *.obj
-
-
-
- cd ..\basic_alg
-
- nmake /nologo /i /f ..\make.src L=libL
-
- lib /nologo ..\..\libL.lib *.obj
-
-
-
- cd ..\numbers
-
- nmake /nologo /i /f ..\make.src L=libL
-
- lib /nologo ..\..\libL.lib *.obj
-
-
-
- cd ..\dict
-
- nmake /nologo /i /f ..\make.src L=libL
-
- lib /nologo ..\..\libL.lib *.obj
-
-
-
- cd ..\prio
-
- nmake /nologo /i /f ..\make.src L=libL
-
- lib /nologo ..\..\libL.lib *.obj
-
-
-
- cd ..\graph
-
- nmake /nologo /i /f ..\make.src L=libG
-
- lib /nologo /out:..\..\libG.lib *.obj
-
-
-
- cd ..\graph_alg
-
- nmake /nologo /i /f ..\make.src L=libG
-
- lib /nologo ..\..\libG.lib *.obj
-
-
-
- cd ..\plane
-
- nmake /nologo /i /f ..\make.src L=libP
-
- lib /nologo /out:..\..\libP.lib *.obj
-
-
-
- cd ..\plane_alg
-
- nmake /nologo /i /f ..\make.src L=libP
-
- lib /nologo ..\..\libP.lib *.obj
-
-
-
- cd ..\window
-
- nmake /nologo /i /f ..\make.src L=libP
-
- lib /nologo ..\..\libP.lib *.obj
-
-
-
- rem the msdos windowing stuff isnt going to work without some work.
-
- rem cd ..\msdos
-
- rem nmake /nologo /i /f ..\make.src L=libWx
-
- rem lib /nologo /out:..\..\libWx.lib *.obj
-
-
-
- cd ..\..
-
-
-
- ************************ end make_lib.bat ***********************
-
-
-
- put the make_lib.bat in the root of the unzipped leda stuff.
-
-
-
- 3) here is a new make.src with the right CFLAGS for MSC. put it in
-
- the LEDA /src directory (replacing the existing make.src).
-
-
-
- *************************** begin make.src ***********************
-
-
-
- #----------------------------------------------------------------
-
- # Microsoft Visual C++ 4.x (_MSV_VER >= 1000)
-
- #
-
- # note: microsoft's lib is an oddball, so we use it in
-
- # make_lib.bat instead.
-
- #---------------------------------------------------------------
-
-
-
- LIB = ..\..\$(L).lib
-
- CFLAGS = /nologo
-
- # compat: /vmg /GX /Za /Op-
-
- # speed: /G5 /O2 /Ob2
-
- o = .obj
-
-
-
- .c.obj:
-
- cl $(CFLAGS) /c /Tp $*.c
-
- # lib /out:$(LIB) $*.obj
-
-
-
- all: $(LIB)
-
-
-
- !include Make.lst
-
-
-
- $(LIB): $(OBJECTS)
-
-
-
- clean:
-
- rm -f $(OBJECTS)
-
-
-
- ******************************* end make.src ***********************
-
-
-
- 4) edit the /include/leda/system.h file. this file is where leda has
-
- some compiler-compatibility options. you will need to undefine the
-
- __TEMPLATE_FUNCTIONS__ option. Note that the microsoft compiler
-
- defines the _MSC_VER environment variable which corresponds to the
-
- compiler version. in visual c v4.0, _MSC_VER == 1000, since the
-
- version of the actual compiler is v10.0. _MSC_VER == 900 for visual c
-
- v2.2.
-
-
-
-
-
- 5) that should do it. i got all but 2 .c files to compile using the
-
- above setup with leda 3.2.2. using leda 3.3 i think you may not have
-
- to do step (4) above. in any case, future leda versions and MSC
-
- updates should resolve some of the compatibility problems.
-
-
-
-
-
- ------------------------------------------------------------------
-
- Dan Goldwater daniel_goldwater@brown.edu
-